/*
 * @version:
 * @Author: jiaqngzhen
 * @Company: aikucun
 * @Date: 2020-02-10 15:09:19
 * @LastEditors: jiaqingzhen
 * @LastEditTime: 2020-02-10 15:09:22
 * @Description:
 */
let Y;
class lock {
  static afterOpen() {
    Y = document.scrollingElement.scrollTop;
    document.body.style.position = 'fixed';
    document.body.style.top = `${-Y}px`;
  }

  static beforeClose() {
    document.body.style.position = '';
    document.body.style.top = '';
    document.scrollingElement.scrollTop = Y;
  }
}
export default lock;
